using UnityEngine;

namespace CinemaDirector
{
	[CutsceneItem("Physics", "Toggle Gravity")]
	public class ToggleGravityEvent : CinemaActorEvent
	{
		public override void Trigger(GameObject actor)
		{
			Rigidbody component = actor.GetComponent<Rigidbody>();
			if (component != null)
			{
				component.useGravity = !component.useGravity;
			}
		}
	}
}
